#include <iostream>
#include <pthread.h>
#include <vector>
#include <string>
#include <queue>
using namespace std;

class Task {
public:
    Task();
    ~Task();
    void setArgs(string str);
private:
    int val;
};

class ThreadPool {
public:
    ThreadPool();
    ~ThreadPool();
    void create_thread_pool(int thread_num);
    static void* thread_func(void*);
    void addTask(Task& task);
    vector<pthread_t> thread_list;

private:
    pthread_mutex_t thread_mutex;
    pthread_cond_t thread_condition;
    bool is_runing;
    queue<Task>task_queue;
};